package com.lnsystem.service;

import java.util.List;

import org.springframework.stereotype.Component;

import com.lnsystem.model.Stock;
import com.lnsystem.model.StockDailyData;
import com.lnsystem.model.StockData;
import com.lnsystem.model.StockDataType;

/**
 * @author guru
 *
 */
@Component 
public interface QuoteService {
	
	
	/**
	 * @param symbol - the symbol for which quote is being requested.
	 * @return - the Stock object 
	 */
	public Stock getStockData(String symbol);
	
	/** 
	 * Downloads the daily data from TK for the given symbol
	 * @param symbol - the symbol for which quote is being requested.
	 * @return - the StockDailyData object 
	 */
	public StockDailyData getDailyDataForStock(String symbol);
	
	
	
	/**
	 * Gets daily data from TK for all stocks in the symbols file downloaded from FTP site
	 * @param symbols - a list of symbols for which quote is being requested.
	 * @return list of Stock objects corresponding to the symbols  
	 */
	public List<StockDailyData> getDailyDataForStocks();


	/**
	 * @param <T>
	 * @param symbol - the stock symbol
	 * @param startDate - start date in YYYY-MM-DD format
	 * @param endDate - end date in in YYYY-MM-DD format
	 * @param dataType - "daily" or "weekly"
	 * @return returns the daily/weekly datalist
	 */
	public <T> List<T> getHistoricalQuotes(String symbol, String startDate, String endDate, StockDataType dataType);


	/**
	 * @param symbols - the list of comma separated symbols for which quote is being requested.
	 * @return - the quotes response (in JSON format) 
	 */
	String getMultipleQuotesAsJSONString(String symbols);

}
